<%@page contentType="text/html"%>
<%@page pageEncoding="UTF-8"%>
<%@taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
<%@taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
        <title>Detalle de Permiso</title>
    </head>
    <body>
        <f:view>
            <h:messages errorStyle="color: red" infoStyle="color: green" layout="table"/>
            <h1>Detalle de Permiso</h1>
            <h:form>
                <h:panelGrid columns="2">
                    <h:outputText value="Id Permiso:"/>
                    <h:outputText value="#{permiso.permiso.idPermiso}" title="Id Permiso" />
                    <h:outputText value="Descripcion Permiso:"/>
                    <h:outputText value="#{permiso.permiso.descripcionPermiso}" title="Descripcion Permiso" />
                    <h:outputText value="Roles:" />
                    <h:panelGroup>
                        <h:outputText rendered="#{empty permiso.permiso.permisorolCollection}" value="(No Items)"/>
                        <h:dataTable value="#{permiso.permiso.permisorolCollection}" var="item" 
                                     border="0" cellpadding="2" cellspacing="0" rowClasses="jsfcrud_oddrow,jsfcrud_evenrow" rules="all" style="border:solid 1px" 
                                     rendered="#{not empty permiso.permiso.permisorolCollection}">
                            <h:column>
                                <f:facet name="header">
                                    <h:outputText value="Habilitado"/>
                                </f:facet>
                                <h:outputText value=" #{item.habilitado}"/>
                            </h:column>
                            <h:column>
                                <f:facet name="header">
                                    <h:outputText value="Fecha Asignacion"/>
                                </f:facet>
                                <h:outputText value="#{item.fechaAsignacion}">
                                    <f:convertDateTime type="DATE" pattern="dd/MM/yyyy" />
                                </h:outputText>
                            </h:column>
                            <h:column>
                                <f:facet name="header">
                                    <h:outputText value="Rol"/>
                                </f:facet>
                                <h:outputText value=" #{item.rol}"/>
                            </h:column>
                            <h:column>
                                <f:facet name="header">
                                    <h:outputText escape="false" value=""/>
                                </f:facet>
                                <h:commandLink value="Ver" action="#{permisorol.detailSetup}">
                                    <f:param name="jsfcrud.currentPermiso" value="#{permiso.asString[permiso.permiso]}"/>
                                    <f:param name="jsfcrud.currentPermisorol" value="#{permisorol.asString[item]}"/>
                                    <f:param name="jsfcrud.relatedController" value="permiso" />
                                    <f:param name="jsfcrud.relatedControllerType" value="modelo.PermisoController" />
                                </h:commandLink>
                                <h:outputText value=" "/>
                                <h:commandLink value="Editar" action="#{permisorol.editSetup}">
                                    <f:param name="jsfcrud.currentPermiso" value="#{permiso.asString[permiso.permiso]}"/>
                                    <f:param name="jsfcrud.currentPermisorol" value="#{permisorol.asString[item]}"/>
                                    <f:param name="jsfcrud.relatedController" value="permiso" />
                                    <f:param name="jsfcrud.relatedControllerType" value="modelo.PermisoController" />
                                </h:commandLink>
                                <h:outputText value=" "/>
                                <h:commandLink value="Borrar" action="#{permisorol.destroy}">
                                    <f:param name="jsfcrud.currentPermiso" value="#{permiso.asString[permiso.permiso]}"/>
                                    <f:param name="jsfcrud.currentPermisorol" value="#{permisorol.asString[item]}"/>
                                    <f:param name="jsfcrud.relatedController" value="permiso" />
                                    <f:param name="jsfcrud.relatedControllerType" value="modelo.PermisoController" />
                                </h:commandLink>
                            </h:column>
                        </h:dataTable>
                    </h:panelGroup>
                </h:panelGrid>
                <br />
                <h:commandLink action="#{permiso.destroy}" value="Borrar">
                    <f:param name="jsfcrud.currentPermiso" value="#{permiso.asString[permiso.permiso]}" />
                </h:commandLink>
                <br />
                <br />
                <h:commandLink action="#{permiso.editSetup}" value="Editar">
                    <f:param name="jsfcrud.currentPermiso" value="#{permiso.asString[permiso.permiso]}" />
                </h:commandLink>
                <br />
                <h:commandLink action="#{permiso.createSetup}" value="NUEVO" />
                <br />
                <h:commandLink action="#{permiso.listSetup}" value="Listar"/>
                <br />
                <a href="/sistemaReserva/faces/welcomeJSF.jsp">Index</a>
            </h:form>
        </f:view>
    </body>
</html>
